{layout name="/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>订单管理 <small>提现详情信息</small></h1>
        <ol class="breadcrumb">
          <li><a href="/index"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li onclick="javascript:history.back(-1);"><a href="javaScript:;"><i class="fa fa-dashboard"></i> 订单信息列表</a></li>
          <li class="active"><i class="fa fa-table"></i> 提现详情信息</li>
        </ol>
      </div>
    </div>
    <div class="row">
      <div class="col-lg-12">
        <div class="panel panel-info">
          <div class="panel-heading">
            <h3 class="panel-title">提现信息</h3>
          </div>
          <div class="panel-body">
            <span class="glyphicon glyphicon-file"> 基本信息</span>
          </div>
          <table class="table table-striped">
          	<tr><td>提现账号：{$getCashInfo.bank_num}</td><td>提现人姓名：{$getCashInfo->users->real_name}</td></tr>
            <tr>
            	<td><span style="color: red;">提现金额</span>：{$getCashInfo.amount}元</td>
            	<td><span style="color: red;">账户余额</span>：{$balance}</td>
            </tr>
            <tr><td>开户银行:{$getCashInfo.open_bank}</td><td>申提现时间：{$getCashInfo.created_at}</td></tr>
          </table>
        </div>
          <input type="button" value="返回" class="btn btn-default"  onclick="javascript:history.back(-1);" />
          {if $getCashInfo['status'] eq 0}
          <input type="submit" id="applyPass" value="申请通过" class="btn btn-primary"/>
          <input type="submit" id="failedApply" value="申请拒绝" class="btn btn-danger"/>
          {elseif $getCashInfo['status'] eq 1}
         	<input type="submit" id="agreeCash" value="允许提现" class="btn btn-primary"/>
         	<input type="submit" id="refuseCash" value="拒绝提现" class="btn btn-danger"/>
         	{/if}
         <form id="agreeCashForm" action="/cashs/index" method="post">
         	<input type="hidden" name="id" value="{$getCashInfo.id}" />
         </form>
         <form id="refuseCashForm" action="/cashs/failedindex" method="post">
         	<input type="hidden" name="id" value="{$getCashInfo.id}" />
         </form>
         <form id="applyPassForm" action="/cashs/applyindex" method="post">
         	<input type="hidden" name="id" value="{$getCashInfo.id}" />
         </form>
         <form id="failedApplyForm" action="/cashs/failedapply" method="post">
         	<input type="hidden" name="id" value="{$getCashInfo.id}" />
         </form>
      </div>
    </div>
    <!-- /.row -->
  </div><!-- /#page-wrapper -->
	<script type="text/javascript">
  	$('#agreeCash').click(function(){
  		if(confirm('确认允许提现码')){
  			$('#agreeCashForm').submit();
  		}
  	})
		$('#refuseCash').click(function(){
			if(confirm('确认拒绝提现码')){
				$('#refuseCashForm').submit();
			}
  	})
		$('#applyPass').click(function(){
			if(confirm('确认申请提现通过码')){
				$('#applyPassForm').submit();
			}
  	})
		$('#failedApply').click(function(){
			if(confirm('确认拒绝申请码')){
				$('#failedApplyForm').submit();
			}
  	})
  </script>
